//
//  LGSeviceStatisticsItem.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/5/8.
//

#import "LGSeviceStatisticsItem.h"

@interface LGSeviceStatisticsItem()

/**   */
@property (nonatomic , strong)UILabel *titleLabel;
/**   */
@property (nonatomic , strong)UILabel *contentLabel;

@end

@implementation LGSeviceStatisticsItem

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.titleLabel];
        [self addSubview:self.contentLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.mas_centerY).offset(viewPix(3));
            make.centerX.equalTo(self);
        }];
        [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.mas_centerY).offset(-viewPix(2));
            make.centerX.equalTo(self);
        }];
    }
    return self;
}

-(void)setTitle:(NSString *)title{
    _title = title;
    self.titleLabel.text = title;
}

-(void)setContent:(NSString *)content{
    _content = content;
    self.contentLabel.text = content;
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"" colorString:@"#333333" textFont:LGFont(14) textAlignment:NSTextAlignmentCenter lines:1];
    }
    return _titleLabel;
}

-(UILabel *)contentLabel{
    if(!_contentLabel){
        _contentLabel = [UILabel lableWithText:@"" colorString:@"#2E9AFC" textFont:LGFontWeight(18, UIFontWeightSemibold) textAlignment:NSTextAlignmentCenter lines:1];
    }
    return _contentLabel;
}

@end
